﻿/*****************************************************************//**
 * @file    FITKGraphObject3D.h
 * @brief   Graph object 3D base.
 *          Code Design:
 *          1. The source data and input data( except actors ) can be
 *          initialized in the base class's constructor, for the pointer
 *          are all the members of the base class( can be deleted in all
 *          situations );
 *          2. The actors MUST be intialized in SUB-CLASS, not the SUPER-
 *          CLASS, for the actors' count is one of factor to check whether
 *          the graph object is valid, so if the actors are added to the 
 *          graph in the beginning of generating the graph object, then 
 *          the graph object may be valid, although the graph object's input 
 *          data object is invalid. For another reason, the actor cannot be 
 *          deleted in the sub-class, for the actors are managed in
 *          super-class;
 *          3. The 'updateVisibility' function can not only update the whole 
 *          graph object's visibility, but also update the visibility of part 
 *          of it.( Such as marks can be affected by its components<set or 
 *          surface>)  And the 'update' funtion can not only change the graph's
 *          visibility, but also the graph object's data.
 *          4. The 'highlight' function can highlight the graph object to
 *          any colors if the input parameter is valid ( not QColor() ),
 *          and if the input color is invalid, then the graph object will
 *          be highlighted in its default highlighted color.( the default 
 *          highlight color list can be viewed in 'FITKGraphCommons' );
 *          5. The 'isRelatedTo' function can check if the given id is
 *          the data object id of itself, or one of the components' id of 
 *          the graph object, it is useful while updating the marks graph
 *          object when the set or surface or instance has been changed or 
 *          deleted;
 *          6. Some of the graph objects may has fixed pixel size in screen,
 *          so their bounds are dynamic. If the render window reset the
 *          camera with the dynamic bounds of graph object, the focal point
 *          of the camera will be changed every time we call reset camera.
 *          In this reason, every graph object need to set the 'm_hasFixedBounds',
 *          and override the function 'getFixedBounds';
 *          7. The graph object has two highlight types. The pre-highlight is
 *          mainly for picking, and the highlight is the real highlight
 *          while the graph object is selected. The graph object not only
 *          change the color but also the rendering layer of render window
 *          while it is highlighting( pre-highlight do not change the layer ).
 *          And the advanced highlight mode is only for complex graph objects,
 *          such as 'spring' and 'wire'.
 * 
 *          P.S. About the render layer:
 *          The first(0) render layer is for the model or other mark which don't
 *          need to be rendered at the top of the window. And the second(1) render
 *          layer is for the highlight graph object or other annotions labels
 *          or marks, such as ref-points and coordinates. Most of the graph objects
 *          will change their render layer while they are highlighting.
 *  
 * @author  ChengHaotian (yeguangbaozi@foxmail.com)
 * @date    2024-03-21
 *********************************************************************/

#ifndef __FITKGRAPHOBJECT3D_H__
#define __FITKGRAPHOBJECT3D_H__

#include "FITK_Component/FITKRenderWindowVTK/FITKGraphObjectVTK.h"

#include "FITKVTKGraphAdaptorAPI.h"

 // Qt
#include <QHash>
#include <QColor>

// Forward declaration
class QVariant;

class vtkActor;
class vtkObject;

class FITKGraphActor;

namespace Comp
{
    class FITKGraphRender;
}

namespace Core
{
    class FITKAbstractNDataObject;
    class FITKAbstractGraphWidget;
}

namespace AbaqusData
{
    class FITKDataCase;
}

// QString to char*
#ifndef QStringToCharA
#define QStringToCharA(str) \
    str.toUtf8().data()
#endif // !QStringToCharA

/**
 * @brief   The data type.
 *          ( This enum is mainly prepared for getting picked information,
 *          so the enum has no value about 'Assembly', 'Load', 'Boundary'
 *          and other unpickable marks.)
 * @author  ChengHaotian (yeguangbaozi@foxmail.com)
 * @date    2024-04-18
 */
enum GraphDataType
{
    OtherGraph = -1,
    PartGraph = 0,
    InstanceGraph,
    RefNodeGraph,
    AssemblyPointsGraph,
    CoordinateGraph,
    WireGraph,
    PostModelGraph,
    PostCutGraph,
    GeometryPartGraph,
    GeometryInstanceGraph,
    GeometrySketchGraph,
    GeometryPartFeatureGraph,

};

/**
 * @brief   Save the data information for graph object.
 *          ( This struct is mainly prepared for getting picked information,
 *          if the graph object is not a model, than the struct will only save
 *          the case object id. )
 * @author  ChengHaotian (yeguangbaozi@foxmail.com)
 * @date    2024-04-18
 */
struct GraphInfo
{
    // The type of the graph object.
    GraphDataType Type = OtherGraph;

    // The case id.
    int CaseId = -1;

    // The data id.( Not all of them have value. )
    int PartId = -1;
    int InstanceId = -1;
    int AssemblyId = -1;
    int RefNodeId = -1;
    int CoordId = -1;
    int WireId = -1;
    int SketchId = -1;
    int PostModelId = -1;
    int PostCutId = -1;
    
    // The data object id.
    int DataObjId = -1;
};

namespace Exchange
{
    /**
     * @brief   Graph object for 3D.
     * @author  ChengHaotian (yeguangbaozi@foxmail.com)
     * @date    2024-03-25
     */
    class FITKVTKGRAPHADAPTORAPI FITKGraphObject3D : public Comp::FITKGraphObjectVTK
    {
        Q_OBJECT

        // Regist
        FITKGraphObjectRegist(FITKGraphObject3D, Core::FITKAbstractObject);
        FITKCLASS(Exchange, FITKGraphObject3D);

    public:
        /**
         * @brief   Constructor.
         * @param   caseData: The case data
         * @param   dataObj: The data object need to exchange
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-03-21
         */
        FITKGraphObject3D(AbaqusData::FITKDataCase* caseData, Core::FITKAbstractDataObject* dataObj);

        /**
         * @brief   Destructor.[virtual]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-03-20
         */
        virtual ~FITKGraphObject3D();

        /**
         * @brief   Get the id array name in point or cell data.[static]
         * @return  The array name
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-02
         */
        static QString IdArrayName();

        /**
         * @brief   Delete the set grid data by the given set id.[static]
         * @param   setId: The set id
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-18
         */
        static void DeleteSetGrid(int setId);

        /**
         * @brief   Delete the surface poly data by the given surface id.[static]
         * @param   surfaceId: The surface id
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-18
         */
        static void DeleteSurfaceGrid(int surfaceId);

        /**
         * @brief   Judge and save the graph widget.[BETA]
         * @param   widget: The graph widget.
         * @return  If the graph object has set a graph widget already, then return it, and
         *          do not save the given widget.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-07
         */
        Core::FITKAbstractGraphWidget* setConstGraphWidget(Core::FITKAbstractGraphWidget* widget);

        /**
         * @brief   Check the data object and the actors count.[virtual]
         * @return  Is the graph object valid
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2025-01-21
         */
        virtual bool isValid();

        /**
         * @brief   Set if the graph object can be picked.[virtual]
         * @param   isPickable: Pickable
         * @param   dim: The dimision of the pickable object( -1 means the whole graph object )[default]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-23
         */
        virtual void setPickable(bool isPickable, int dim = -1);

        /**
         * @brief   Get the highlight states of the graph.
         * @return  Is highlighting
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        bool isHighlighting();

        /**
         * @brief   Get the advanced highlight states of the graph.
         * @return  Is advanced highlighting
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-06-18
         */
        bool isAdvancedHighlighting();

        /**
         * @brief   Get the pre-highlight states of the graph.
         * @return  Is highlighting
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-24
         */
        bool isPreHighlighting();

        /**
         * @brief   Set the color.( For highlighting 'set' and 'surface' only --- and also picked data. )[virtual]
         * @param   color: The color
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-22
         */
        virtual void setColor(QColor color);

        /**
         * @brief   Set the render, which will add this graph object to itself.( for calculating size )
         * @param   render: The FITKGrapgRender
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-03-26
         */
        virtual void setFITKRender(Comp::FITKGraphRender* render);

        /**
         * @brief   Get the layer need to be render.[virtual]
         * @return  The layer index
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-01
         */
        virtual int getRenderLayer();

        /**
         * @brief   Get the layer for highlighting need to be render.[virtual]
         * @return  The layer index
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-24
         */
        virtual int getRenderLayerHighlight();

        /**
         * @brief   Pre-highlight the graph actors.[virtual]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-24
         */
        virtual void preHighlight();

        /**
         * @brief   Highlight the graph actors.[virtual]
         * @param   color: The given color for highlighting this time[default]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-03-26
         */
        virtual void highlight(QColor color = QColor());

        /**
         * @brief   Highlight the graph actors.( Need to be overrided in sub-class. )[virtual]
         * @param   details: The details about highlighting, such as the things need to be highlighted, 
         *          or the highlight rule, or maybe the index( indice ) or id(s) of the highlight object(s) 
         *          in this graph object.[default]
         * @param   color: The given color for highlighting this time[default]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-06-18
         */
        virtual void advanceHighlight(QVariant details = QVariant(), QColor color = QColor());

        /**
         * @brief   Dis-highlight the graph actors.[virtual]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-10
         */
        virtual void disHighlight();

        /**
         * @brief   Dis-highlight the graph actors if the graph object is in advanced highlighting mode.[virtual]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-06-18
         */
        virtual void disAdvanceHighlight();

        /**
         * @brief   Update the visibility with data object's visibility.[virtual]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-14
         */
        virtual void updateVisibility();

        /**
         * @brief   Update all graph actors.[virtual][override]
         * @param   forceUpdate: Force update[default]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-03-26
         */
        virtual void update(bool forceUpdate = false) override;

        /**
         * @brief   Get the data object id.[virtual]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-16
         */
        virtual int getDataId();

        /**
         * @brief   Get the graph object's information.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-18
         */
        GraphInfo getGraphInfo();

        /**
         * @brief   Update the actor with the camera normal if necessary.[virtual]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-29
         */
        virtual void updateCameraNormal();

        /**
         * @brief   Update the actor with the camera position if necessary.[virtual]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-05
         */
        virtual void updateCameraPosition();

        /**
         * @brief   Update the actor with the mouse move if necessary.[virtual]
         * @param   pos: The display position of the mouse
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-05
         */
        virtual void updateMouseMove(int* pos);

        /**
         * @brief   Update the actor with the mouse pressed if necessary.[virtual]
         * @param   pos: The display position of the mouse
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-06
         */
        virtual void updateMousePressed(int* pos);

        ///**
        // * @brief   Simplified the graph object while the camera is changing.
        // * @param   flag: Is on
        // * @author  ChengHaotian (yeguangbaozi@foxmail.com)
        // * @date    2024-05-07
        // */
        //void setGraphSimplified(bool flag);

        /**
         * @brief   Simplified the graph object if necessary.[virtual]
         * @param   enabled: Enabled simplified flag
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-07
         */
        virtual void simplified(bool enabled);

        /**
         * @brief   Get the additional graph objects of this graph.( Not all the graph objects have additional objects. )[virtual]
         * @return  The graph object list;
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-10
         */
        virtual QList<FITKGraphObject3D*> getAddinGraphObjs();

        /**
         * @brief   Set the information.[virtual]
         * @param   info: The variant information
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-22
         */
        virtual void setAddinInfo(QVariant info);

        /**
         * @brief   Whether the graph object has relation with the given data object id.[virtual]
         *          The following situations will return true:
         *          1. The data id is the same as the graph object's data object's id;
         *          2. The data use 'set' or 'surface' data, and the id is one of the set or surface id;
         *          3. The model id of the 'set' or 'surface' used by this graph object is the same as the data id.
         *          P.S.
         *          The 'FITKGraphObjectPick' and 'FITKGraphObjectPickPreview' will always return false,
         *          because they have no data object and case data object.
         * @param   dataObjId: The data object id
         * @return  Has relation
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-24
         */
        virtual bool isRelatedTo(int dataObjId);

        /**
         * @brief   Check if the given actor is belonged to this graph object.[virtual]
         * @param   actor: The actor( 2D or 3D )
         * @return  Is belonged to
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-31
         */
        virtual bool contains(vtkProp* actor);

        /**
         * @brief   Set the variant input data.
         * @param   value: The input value
         * @param   inputRole: The input role[default]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-09-12
         */
        void setInputVariantData(QVariant value, int inputRole = 1000);

        /**
         * @brief   Get the variant output data.
         * @param   outputRole: The output role[default]
         * @return  The output value
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-09-12
         */
        QVariant getOutputVariantData(int outputRole = 2000);

        /**
         * @brief   Set the user data to the given port( role key ).
         * @param   role: The data role key
         * @param   value: The user data
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-18
         */
        void setUserData(int role, QVariant value);

        /**
         * @brief   Get the user data by the given port( role key ).
         * @param   role: The data role key
         * @return  The user data
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-18
         */
        QVariant getUserData(int role);

        /**
         * @brief   Show or hide graph object.[virtual]
         * @param   visibility: The visibility of graph object
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-24
         */
        virtual void setVisible(bool visibility);

        /**
         * @brief   Get the user data by the given port( role key ).[template]
         * @param   role: The data role key
         * @return  The user data
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-18
         */
        template<class T>
        T getUserDataAs(int role)
        {
            if (!m_userInfo.contains(role))
            {
                return QVariant().value<T>();
            }

            return m_userInfo[role].value<T>();
        }

        /**
         * @brief   Test function.[virtual]
         * @param   details: The input information
         * @return  Is success
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-08
         */
        virtual bool test(QVariant& details);

    signals:
        /**
         * @brief   Signal - Need to be deleted while the data object has been deleted.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-02
         */
        void sig_needToBeDeleted();

        /**
         * @brief   Signal - The object has been deleted.
         * @param   dataId: The data object id
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2025-01-21
         */
        void sig_destroyed(int dataId);

    protected:
        /**
         * @brief   Constructor.( For copying data )
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-02
         */
        FITKGraphObject3D() = default;

        /**
         * @brief   Set the layer need to be render.[virtual]
         * @param   layer: The layer index
         * @param   layerHighlight: The layer index for highlighing[default]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-01
         */
        virtual void setRenderLayer(int layer, int layerHighlight = -1);

        /**
         * @brief   Set the layer for highlighting need to be render.[virtual]
         * @param   layer: The layer index
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-24
         */
        virtual void setRenderLayerHighlight(int layer);

        /**
         * @brief   Initialize the actor's visualization properties.[virtual]
         * @param   actor: The actor
         * @param   details: The detail information for setting properties[default]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-07
         */
        virtual void initActorProperties(vtkProp* actor, QVariant details = QVariant());

        /**
         * @brief   Delete all cache pointer which will not affect the visualization.[virtual]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-13
         */
        virtual void clearCache();

        /**
         * @brief   Modify all actors.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-25
         */
        void updateActors();

        /**
         * @brief   Remove the addin graph object from the addin graph object list.[virtual]
         * @param   obj: The graph object
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-29
         */
        virtual void removeAddinGraphObj(FITKGraphObject3D* obj);

        /**
         * @brief   Get the visibility from the data object.[virtual]
         * @return  The visibility
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-13
         */
        virtual bool getDataVisibility();

        /**
         * @brief   Get the parent model data visibility.
         * @param   id: The parent data object id
         * @return  Visibility
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-14
         */
        bool getParentDataVisibility(int id);

        /**
         * @brief   Set the light propertied for rendering line actor.
         * @param   fActor: The actor
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-08
         */
        void setLightPropertiesForLine(FITKGraphActor* fActor);

        /**
         * @brief   Set the light propertied for rendering face actor.
         * @param   fActor: The actor
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-08
         */
        void setLightPropertiesForSurface(FITKGraphActor* fActor);

        /**
         * @brief   Delete the VTK object.[template]
         * @param   obj: The vtkObject.[quote]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-15
         */
        template <class T>
        void deleteVtkObj(T* & obj)
        {
            if (obj)
            {
                obj->Delete();
            }

            obj = nullptr;
        }

        /**
         * @brief   Delete the VTK none-smartpointer object list.[template]
         * @param   objs: The vtkObject list.[quote]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-15
         */
        template <class T>
        void deleteVtkObjs(QList<T*> & objs)
        {
            for (T* obj : objs)
            {
                if (obj)
                {
                    obj->Delete();
                }
            }

            objs.clear();
        }

        /**
         * @brief   Delete the c++ object.[template]
         * @param   obj: The object.[quote]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-30
         */
        template <class T>
        void deleteObj(T* & obj)
        {
            if (obj)
            {
                delete obj;
            }

            obj = nullptr;
        }

        /**
         * @brief   Delete the c++ object list.[template]
         * @param   objs: The object list.[quote]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-30
         */
        template <class T>
        void deleteObjs(QList<T*> & objs)
        {
            for (T* obj : objs)
            {
                if (obj)
                {
                    delete obj;
                }
            }

            objs.clear();
        }

        /**
         * @brief   Reset the vtk data object.[template]
         * @param   obj: The vtk data object.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-03
         */
        template <class T>
        void resetVtkObj(T* obj)
        {
            if (obj)
            {
                obj->Reset();
            }
        }

        /**
         * @brief   Reset the vtk data object by copying a new one.[template]
         * @param   obj: The vtk data object.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-18
         */
        template <class T>
        void copyEmptyVtkObj(T* obj)
        {
            if (obj)
            {
                obj->DeepCopy(vtkSmartPointer<T>::New());
            }
        }

        ///**
        // * @brief   Convert the QString to the char*.
        // * @param   str: The QString
        // * @return  The char* from the string
        // * @author  ChengHaotian (yeguangbaozi@foxmail.com)
        // * @date    2024-05-20
        // */
        //char* QStringToCharA(QString str);

    protected:
        /**
         * @brief   The default input data role for setting the variant input.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-09-12
         */
        int m_defaultInputRole = 1000;

        /**
         * @brief   The default output data role for setting the variant input.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-09-12
         */
        int m_defaultOutputRole = 2000;

        /**
         * @brief   The graph object's model information.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-18
         */
        GraphInfo m_graphInfo;

        /**
         * @brief   Whether the graph object need to be simplified while the camera is changing.[const]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-07
         */
#ifdef QT_DEBUG
        const bool m_graphSimplified = true;
#else
        const bool m_graphSimplified = true;
#endif

        /**
         * @brief   Whether the graph object simplified to the feature edges.( For models only for now )[const]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-11
         */
#ifdef QT_DEBUG
        const bool m_simplifiedWithFeature = true;
#else
        const bool m_simplifiedWithFeature = false;
#endif

        /**
         * @brief   Whether the model graph object simplified need to be simplified.[const]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-24
         */
#ifdef QT_DEBUG
        const bool m_simplifiedModel = false;
#else
        const bool m_simplifiedModel = false;
#endif

        /**
         * @brief   Whether the marks need to use more simple glyph.[const]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-24
         */
#ifdef QT_DEBUG
        const bool m_simplifiedGlyph = true;
#else
        const bool m_simplifiedGlyph = false;
#endif

        /**
         * @brief   Whether the marks need to use mask points.[const]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-10-17
         */
#ifdef QT_DEBUG
        const bool m_useMaskPoints = false;
#else
        const bool m_useMaskPoints = false;
#endif

        /**
         * @brief   The max number of each glyph objects.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-10-17
         */
        int m_maxSampleNumber = 500;

        /**
         * @brief   The case data.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-02
         */
        AbaqusData::FITKDataCase* m_caseData{ nullptr };

        /**
         * @brief   The graph widget who owns this graph object first time.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-07
         */
        Core::FITKAbstractGraphWidget* m_constGraphWidget{ nullptr };

        /**
         * @brief   The layer need to be renderer to, default is 0.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-01
         */
        int m_layer = 0;

        /**
         * @brief   The layer for highlighting need to be renderer to, default is 0.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-24
         */
        int m_layerHighlight = 0;

        /**
         * @brief   If the model is highlighting.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-23
         */
        bool m_isHighlighting = false;

        /**
         * @brief   If the model is in advanced highlight mode.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-06-18
         */
        bool m_isAdvHighlighting = false;

        /**
         * @brief   If the model is pre-highlighting.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-04-24
         */
        bool m_isPreHighlighting = false;

        /**
         * @brief   The additional graph object list.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-05-10
         */
        QList<FITKGraphObject3D*> m_addinGraphObjList;

        /**
         * @brief   The user's information dict.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-07-18
         */
        QHash<int, QVariant> m_userInfo;

        /**
         * @brief   The render of the graph object.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-12-05
         */
        Comp::FITKGraphRender* m_fRender{ nullptr };

    };
}   // namespace Exchange

#endif // __FITKGRAPHOBJECT3D_H__
